<%--
  Created by IntelliJ IDEA.
  User: 老白
  Date: 2021/6/18
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人信息页</title>
</head>
<body>

<div id="all">
    <div class="header container-fluid">
        <%@include file="modeHeader.jsp" %>
    </div>
    <div class="container-fluid">
        <div class="row border" style="height: 65vh;">
            <div class="col-sm-3 ">
                <%@include file="modeLeftList.jsp" %>
            </div>
            <div class="col-sm-9 border h-100 d-inline-block overflow-auto">
                <form style="margin: auto;" method="post" action="/user?type=updateInfo">

                    <div class="form-group">
                        <label for="touxiang">头像
                            <a href="modeUploadForm.jsp?username=${userInfo_admin.username}">（点击更换头像）</a>
                        </label>
                        <img src='${userInfo_admin.touxiang}' class="img-thumbnail" width="100px" id="touxiang">
                    </div>

                    <div class="form-group">
                        <label for="username">账号</label>
                        <input name="username" type="text" class="form-control" id="username" disabled
                               value="${userInfo_admin.username}">
                    </div>
                    <div class="form-group">
                        <label for="trueName">姓名</label>
                        <input name="trueName" type="text" class="form-control" id="trueName" disabled value="${userInfo_admin.trueName}">
                    </div>
                    <div class="form-group">
                        <label for="age">年龄</label>
                        <input name="age" type="text" class="form-control" id="age" disabled value="${userInfo_admin.age}">
                    </div>
                    <div class="form-group">
                        <label for="tel">手机号</label>
                        <input name="tel" type="text" class="form-control" id="tel" disabled value="${userInfo_admin.tel}">
                    </div>
                    <button type="submit" class="btn btn-primary" disabled id="doEdit">立即提交</button>
                    <button type="button" class="btn btn-primary" onclick="editInput()">编 辑</button>
                </form>
            </div>
        </div>
    </div>
    <%@include file="foot.jsp" %>
    <script>
        function editInput() {
            console.log(document.getElementById("username").value)
            document.getElementById("username").disabled = false
            document.getElementById("trueName").disabled = false
            document.getElementById("age").disabled = false
            document.getElementById("tel").disabled = false
            document.getElementById("doEdit").disabled = false
        }
    </script>
</div>
</body>
</html>
